﻿using System.Dynamic;
using Basic.FormModel.AgentForm;
using SqlSugar;
using WeDonekRpc.Model;
using WeDonekRpc.SqlSugar.VirtualQuery;
namespace Basic.FormCollect
{
    public interface IAgentFormCollect
    {
        ExpandoObject Get ( QueryStruct query );

        long Add ( TableAddData add );

        long Add ( string tableName, Dictionary<string, object> dic );

        void CreateTable ( string tableName, string show, AgentTableCol[] cols );

        ExpandoObject Get ( string tableName, string linkType, long lnkPk );

        ExpandoObject Get ( string tableName, string linkType, long lnkPk, params string[] col );

        ExpandoObject[] Gets ( string tableName, long mainId, string[] cols );

        ExpandoObject[] Gets ( string tableName, string[] cols );
        ExpandoObject[] Query ( string table, List<IConditionalModel> where, string[] cols, IBasicPage paging, out int count );

        ExpandoObject[] Query ( string table, IBasicPage paging, out int count );
        Result[] Gets<Result> ( string tableName, long mainId, string col );

        Result[] Gets<Result> ( string tableName, string col );

        ExpandoObject Get ( string tableName, long id, string[] cols );

        ExpandoObject Get ( string tableName, List<IConditionalModel> where, List<SelectModel> selects );

        ExpandoObject[] Gets ( string tableName, List<IConditionalModel> where, List<SelectModel> selects );

        ExpandoObject[] GroupBy ( string tableName, List<IConditionalModel> where, List<SelectModel> selects, List<GroupByModel> groupBy );

        ExpandoObject[] GetAll ( string tableName, long mainId, string[] cols );

        ExpandoObject[] Gets ( QueryStruct query );

        ExpandoObject[] Query ( QueryStruct query, IBasicPage paging, out int count );
    }
}